<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="${ctx}/resources/css/page_ajax_choose.css" rel="stylesheet" type="text/css">
<title>E-天下商旅</title>


</head>

<body>

<div class="perform_box">
	<!-- <div class="perform_top"><span>网络搜索：</span><input type="text" > <a href="#" class="btn_small">搜索</a></div> -->
	<table id="table" class="table">
		<thead>
			<tr>
				<th width="100">序号</th>
				<th width="100">用户名</th>
				<th width="100">服务人编号</th>
				<th width="100">销售人编号</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
		 <c:forEach items="${regList}" var="reg">
		 	<tr>
				<td>${reg.showLevel}</td>
				<td><a href="${ctx}/memberBI/serverList?level=${reg.showLevel}&username=${reg.baseUsername}">${reg.baseUsername}</a></td>
				<td>
					<c:if test="${reg.use == true}">${reg.tempUsername}</c:if>
					<c:if test="${reg.use == false}">${reg.parentUsername.baseUsername}</c:if>
					
				</td>
				<td>${reg.registerCommendUsername.baseUsername}</td>
				<td>				     
				      <c:choose>
				     	<c:when test="${reg.use == true}"><a id="select" href="#">选择</a>   	</c:when>
				     	<c:otherwise>
				     		 <c:if test="${reg.registerAvtivestate == 0}">					     		 
				     		       <c:if test="${fn:length(reg.baseUsername) > 0}">	<a vti="${reg.baseUsername}" id="regDelete" href="#">删除</a>	</c:if>						     		          			     		     		 	
				     		 </c:if>
				     	</c:otherwise>
				      </c:choose>
			    </td>
				      
			</tr>
		 </c:forEach>

			
		</tbody>
	</table>
</div>
<script src="${ctx}/resources/script/validate/jquery-1.4.min.js" type="text/javascript"></script>
<script>
	$("#select").live("click",function(){
		parent.jsChoose($(this).closest("tr").find("td").eq(2).text(),$(this).closest("tr").find("td").eq(0).text());
		return false;
	});
	
	$("#regDelete").live("click",function(){
		parent.jsClick($(this).attr("vti"));
		return false;
	});
</script>
</body>
</html>

